package com.xquant.trade.trade.service;

import com.xquant.trade.trade.entity.Balance;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

@Component
@Transactional
public class MarginFunService {

    // 名义本金
    public double getNotionalAmount(Balance balance) {
        return balance.getVolume().doubleValue();
    }

    // 估值
    public double getEval(Balance balance) {
        return 6;
    }

    // 最小本方估值
    public double getMinEval(Balance balance) {
        return 7;
    }

    // 最大本方估值
    public double getMaxEval(Balance balance) {
        return 8;
    }

    // 市值
    public double getMarketValue(Balance balance) {
        return 9;
    }
}
